//导入vue-router
import VueRouter from 'vue-router'


import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewsList from './components/news/NewsList.vue'
import Newsinfo from './components/news/Newsinfo.vue'
import PhotoContainer from './components/photo/PhotoContainer.vue'
import photoinfo from './components/photo/photoinfo.vue'
import Commodity from './components/shop/Commodity.vue'
import ShopInfo from './components/shop/ShopInfo.vue'
import Photodata from './components/shop/Photodata.vue'
import Comment from './components/shop/ShopComment.vue'

//创建实例
var router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/newslist/:id',component:Newsinfo},
        {path:'/home/photo',component:PhotoContainer},
        {path:'/home/photo/photoinfo/:id',component:photoinfo},
        {path:'/home/commodity',component:Commodity},
        {path:'/home/commodity/shopinfo/:id',component:ShopInfo,name:'shopinfo'},
        {path:'/home/commodity/photodata/:id',component:Photodata},
        {path:'/home/commodity/comment/:id',component:Comment,name:'comment'},

    ],
    linkActiveClass:'mui-active'//link链接点击高亮样式覆盖
})

export default router